package com.graduate.after.service.impl;

import com.graduate.after.bean.CategoryDetailInfo;
import com.graduate.after.bean.CategoryInfo;
import com.graduate.after.mapper.CategoryInfoMapper;
import com.graduate.after.service.CategoryInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CategoryInfoServiceImpl implements CategoryInfoService {

    @Autowired
    private CategoryInfoMapper categoryInfoMapper;

    @Override
    public List<CategoryInfo> selectAllStairCategory() {
        List<CategoryInfo> categoryInfos = categoryInfoMapper.selectAllStairCategory();
        return categoryInfos;
    }

    @Override
    public List<CategoryInfo> selectSecondByParentId(Integer parentId) {
        List<CategoryInfo> categoryInfos = categoryInfoMapper.selectSecondByParentId(parentId);
        return categoryInfos;
    }

    @Override
    public List<CategoryDetailInfo> selectCategoryDetailInfo(Long id) {
        List<CategoryDetailInfo> categoryDetailInfos = categoryInfoMapper.selectCategoryDetailInfo(id);
        return categoryDetailInfos;
    }

}
